package com.star.security.authentication;

import com.star.security.context.ResponseToken;

import javax.servlet.http.HttpServletRequest;

/**
 * 认证服务
 *
 * @author yangzj
 */
public interface AuthenticationService {

    /**
     * 登录
     *
     * @param authentication 身份验证
     * @return {@link ResponseToken}
     */
    ResponseToken login(Authentication authentication);

    /**
     * 注销
     *
     * @param request 要求
     */
    void logout(HttpServletRequest request);

    /**
     * 注销
     *
     * @param authentication 身份验证
     */
    void logout(Authentication authentication);

    /**
     * 刷新
     *
     * @param authentication 身份验证
     */
    void refresh(Authentication authentication);
}
